<template>
  <basic-container class="noScrollBar tabMain-wrap">
    <common-template
      ref="detailRef"
      :detailOptions="detailOptions"
      :flowModelId="flowModelId"
      :flowStatus="flowStatus"
      :submitUrl="submitUrl"
      :returnUrl="returnUrl"
    ></common-template>
  </basic-container>
</template>

<script>
import commonTemplate from "../commonTemplate";
import {
    dnzlFlowModelId,
    dnzlSubmit,
    dnzlReturnSubmit,
    getDnzlAuditList,
    dnzlUpdate,
} from "@/api/sxdky/sxdky";
export default {
  data() {
    return {
      // 流程模型
      flowModelId:dnzlFlowModelId,
      // 流程状态
      flowStatus:true,
      // 提交URL
      submitUrl:dnzlSubmit,
      // 驳回URL
      returnUrl:dnzlReturnSubmit,
      detailOptions: {
        label: "电能报告审核管理",
        name: "reportAuditList",
        options: {
          height: "calc(100vh - 425px)",
          addBtn: false,
          menuDelBtn: false,
          menuUpBtn: false,
          menuDownBtn: true,
          dialogDirection: "ltr",
          dialogType: "drawer",
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          indexLabel: "序号",
          viewBtn: false,
          selection: true,
          excelBtn: false,
          dialogClickModal: false,
          menuOtherBtn: true, //自定义操作按钮，下载上传
          gistBtn: false,
          align: "center",
          menuAlign: "center",
          searchIcon: true,
          searchIndex: 3,
          labelWidth: 120,
          editBtn: false,
          delBtn: false,
          column: [
              {
                  label: "检测报告",
                  prop: 'reportUploadName',
                  type: "upload",
                  showFileList: true,
                  loadText: "模板上传中，请稍等",
                  span: 24,
                  propsHttp: {
                      res: "data.data.object",
                  },
                  slot:true,
                  accept: ".docx,.doc,",
                  tip: "请上传 .doc,.docx 标准格式文件",
                  action: '/api/dis-report/dnzl/upload',
              },
              {
                  label: "报告名称",
                  prop: "reportUploadName",
                  editDisplay: false,
                  hide:true,
                  viewDisplay: false,
                  overHidden: true,
                  search: false,
                  addDisplay:false,
                  rules: [
                      {
                          message: "请输入报告名称",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "报告名称",
                  prop: "reportName",
                  hide:true,
                  viewDisplay: false,
                  overHidden: true,
                  editDisplay:false,
                  search: false,
                  addDisplay:false,
                  rules: [
                      {
                          message: "请输入报告名称",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "付款凭证",
                  prop: 'payProof',
                  type: "upload",
                  listType:'picture-card',
                  multiple:true,
                  limit: 5,
                  showFileList: true,
                  loadText: "模板上传中，请稍等",
                  span: 24,
                  propsHttp: {
                      res:"data.data"
                  },
                  slot:true,
                  accept: ".png,.jpeg",
                  tip: "请上传 .png,.jpeg,标准格式文件",
                  action: '/api/dis-report/dnzl/payProofUpload?groupId=dnzl',
              },

              {
                  label: "付款凭证",
                  prop: "payProof",
                  editDisplay: false,
                  hide:true,
                  viewDisplay: false,
                  overHidden: true,
                  addDisplay:false,
                  search: false,
              },
              {
                  label: "报告编号",
                  prop: "reportNum",
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  search: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入报告编号",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "器具名称",
                  prop: "applianceName",
                  search: true,
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入器具名称",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "型号/规格",
                  prop: "type",
                  search: true,
                  editDisplay: true,
                  viewDisplay: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入型号/规格",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "制造单位",
                  prop: "proDept",
                  search: true,
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入制造单位",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "委托单位",
                  prop: "entDept",
                  search: true,
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入委托单位",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "出厂编号",
                  prop: "serialNum",
                  search: true,
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  rules: [
                      {
                          required: true,
                          message: "请输入出厂编号",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "检测日期",
                  prop: "checkDate",
                  sortable: true,
                  editDisplay: true,
                  viewDisplay: true,
                  overHidden: true,
                  rules: [
                      {
                          message: "请输入检测日期",
                          trigger: "click",
                      },
                  ],
              },
              {
                  label: "提交人",
                  prop: "submitName",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: false,
                  overHidden: true,
              },
              {
                  label: "审批人",
                  prop: "flowOperator",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: true,
                  overHidden: true,
              },
              {
                  label: "提交日期",
                  prop: "submitTime",
                  sortable: true,
                  editDisplay: false,
                  viewDisplay: false,
                  overHidden: true,
              },
              {
                  label: "处理状态",
                  prop: "submitStatus",
                  addDisplay:false,
                  hide:true,
                  editDisplay: false,
                  viewDisplay: false,
                  overHidden: true,
              },
              {
                  label: "处理状态",
                  prop: "submitStatus",
                  type: "select",
                  search: true,
                  addDisplay:false,
                  editDisplay: false,
                  viewDisplay: false,
                  dicData: [
                      {
                          label: "新建",
                          value: 0,
                      },
                      {
                          label: "待审核",
                          value: 1,
                      },
                      {
                          label: "已审核",
                          value: 2,
                      },
                      {
                          label: "已退件",
                          value: 3,
                      },
                  ],
              },
          ],
        },
        url: {
          getList: getDnzlAuditList,
          update: dnzlUpdate
        },
      },
    };
  },
  components: {
      commonTemplate,
  },
  computed: {},
  created() {},
  methods: {},

};
</script>

<style lang='scss'>
.tabMain-wrap {
  // height: calc(100vh - 400px);
  overflow: hidden auto;
}
</style>
